﻿#region using
using Microsoft.Xna.Framework;
using AwesomeTanks.Sources.Media;
#endregion

namespace AwesomeTanks.Sources.GameElements.ShootElements.Weapons
{
    /// <summary>
    /// Evolved Gatling.
    /// </summary>
    public class MegaGatling : Weapon
    {
        #region Fields
        public const int BASE_DAMAGE = 5;
        public const int RELOADING_TIME_MS = 150;
        public const float SPEED = 1.5f;
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="MegaGatling"/> class.
        /// </summary>
        public MegaGatling()
            : base(RELOADING_TIME_MS, SPEED, BASE_DAMAGE)
        {
        }

        #endregion

        #region Methods
        /// <summary>
        /// Fires a megagatling shot.
        /// </summary>
        /// <param name="position">The initial position of the megagatling shot.</param>
        /// <param name="direction">The direction of the shot.</param>
        /// <param name="shooter">The shooter.</param>
        public override void Fire(Vector2 position, Vector2 direction, Player shooter)
        {
            direction.Normalize();
            Shoot gatlingShoot = new Shoot(position, direction * this.SpeedFactor, Art.SpriteSheet, Art.GatlingShootSourceRectangle, this.Damages, shooter, ShootType.MEGA_GATLING);
            gatlingShoot.Color = shooter.PlayerColor;
            ShootManager.ShotList.Add(gatlingShoot);
        }
        #endregion
    }
}
